<?php if (!defined('THINK_PATH')) exit();?><html>
    <head>
        <title>供应商列表</title>
        <link href="<?php echo (ADMIN_CSS_URL); ?>bootstrap.css" rel="stylesheet" />
        <link href="<?php echo (ADMIN_CSS_URL); ?>lz-style.css" rel="stylesheet" />
        <script src="<?php echo (ADMIN_JS_URL); ?>jquery.js"></script>
        <script src="<?php echo (ADMIN_JS_URL); ?>bootstrap.js"></script>
        <script src="<?php echo (ADMIN_JS_URL); ?>dataTables/jquery.dataTables.js"></script>
        <script src="<?php echo (ADMIN_JS_URL); ?>dataTables/dataTables.bootstrap.js"></script>
        <script src="<?php echo (ADMIN_JS_URL); ?>DatePicker/WdatePicker.js"></script>
        <script>
            $(document).ready(function () {
                $('#dataTables').dataTable({
                    paging: true,
                    searching: false,
                    showrownumber: true
                });
            });
        </script>
    </head>
    <body>
        <div class="container">
            <div class="row div_head" >
                <div class=" col-xs-6 col-sm-6 text-primary">
                    当前位置是：生产系统>供应商管理>供应商设置>供应商列表
                </div>
                <div class=" col-xs-6 col-sm-3"></div>
                <div class=" col-xs-6 col-sm-3">
                    <a style="text-decoration: none;" href="/ecs/index.php/Admin/Vendor/add">【添加】</a>
                </div>
            </div>
            <hr />
            <div class="row div_form" >
                <form action="/ecs/index.php/Admin/Vendor/lst" method="post">
                    <div class="text-right col-xs-6 col-sm-3 " ><label for="VendorShortName" class="control-label"><?php echo (LB_VENDORSHORTNAME); ?>:</label></div>
                    <div class="col-xs-6 col-sm-3 div_text" >
                        <input type="text" id="VendorShortName" name="VendorShortName" class="form-control" placeholder="<?php echo (LB_VENDORSHORTNAME); ?>"  value="" maxlength="42"/>
                    </div>
                    <div class="text-right col-xs-6 col-sm-3 " ><label for="VendorFullName" class="control-label"><?php echo (LB_VENDORFULLNAME); ?>:</label></div>
                    <div class="col-xs-6 col-sm-3 div_text" >
                        <input type="text" id="VendorFullName" name="VendorFullName" class="form-control" placeholder="<?php echo (LB_VENDORFULLNAME); ?>"  value="" maxlength="42"/>
                    </div>
                    <div class="text-right col-xs-6 col-sm-3 " ><label for="VendorAddress" class="control-label"><?php echo (LB_VENDORADDRESS); ?>:</label></div>
                    <div class="col-xs-6 col-sm-3 div_text" >
                        <input type="text" id="VendorAddress" name="VendorAddress" class="form-control" placeholder="<?php echo (LB_VENDORADDRESS); ?>"  value="" maxlength="200"/>
                    </div>
                    <div class="text-right col-xs-6 col-sm-3 " ><label for="VendorRespName" class="control-label"><?php echo (LB_VENDORRESPNAME); ?>:</label></div>
                    <div class="col-xs-6 col-sm-3 div_text" >
                        <input type="text" id="VendorRespName" name="VendorRespName" class="form-control" placeholder="<?php echo (LB_VENDORRESPNAME); ?>"  value="" maxlength="50"/>
                    </div>



                    <div class="col-xs-6 col-sm-3">
                        <input type="submit" id="search"  class="btn btn-default" value="查询">
                    </div>

                </form>
                <div id="error" class="row text-danger"></div>
                <div id="success" class="row text-success"></div>
            </div>
            <hr />
            <div class="row div_content" >
                <div class="col-md-12">
                    <div class="table-responsive">
                        <table class="table table-striped table-bordered table-hover table-condensed" id="dataTables" border="1">
                            <thead>
                                <tr>
                                    <th class="div_tab_head">序号</th>

                                    <th class="div_tab_head"><?php echo (LB_VENDORSHORTNAME); ?></th>

                                    <th class="div_tab_head"><?php echo (LB_VENDORFULLNAME); ?></th>

                                    <th class="div_tab_head"><?php echo (LB_VENDORADDRESS); ?></th>

                                    <th class="div_tab_head"><?php echo (LB_VENDORRESPNAME); ?></th>

                                    <th class="div_tab_head"><?php echo (LB_VENDORRESPPHONENO); ?></th>

                                    <th class="div_tab_head"><?php echo (LB_VENDORRESPMOBILEPHONENO); ?></th>

                                    <th class="div_tab_head">操作</th>
                                </tr>
                            </thead>
                            <tbody>
                            <?php if(is_array($lst)): foreach($lst as $key=>$row): ?><tr>
                                    <td class="div_tab_cell"><?php echo ($key+1); ?></td>
                                    <td class="div_tab_cell div_tab_cell_text"><?php echo (stripcslashes($row["vendorshortname"])); ?></td>
                                    <td class="div_tab_cell div_tab_cell_text"><?php echo (stripcslashes($row["vendorfullname"])); ?></td>
                                    <td class="div_tab_cell div_tab_cell_text"><?php echo (stripcslashes($row["vendoraddress"])); ?></td>
                                    <td class="div_tab_cell div_tab_cell_text"><?php echo (stripcslashes($row["vendorrespname"])); ?></td>
                                    <td class="div_tab_cell div_tab_cell_text"><?php echo (stripcslashes($row["vendorrespphoneno"])); ?></td>
                                    <td class="div_tab_cell div_tab_cell_text"><?php echo (stripcslashes($row["vendorrespmobilephoneno"])); ?></td>

                                    <td align="center" class="div_tab_cell"><div class="btn-group">
                                            <a id="edit" type="button" class="btn btn-default" href="/ecs/index.php/Admin/Vendor/edit/VendorID/<?php echo ($row["vendorid"]); ?>"><span class="glyphicon glyphicon-pencil"></span></a>
                                            <a id="delete" type="button" class="btn btn-default"href="/ecs/index.php/Admin/Vendor/del/VendorID/<?php echo ($row["vendorid"]); ?>" onClick="if (confirm('确定要删除吗？'))
                                                        return true;
                                                    else
                                                        return false;"><span class="glyphicon glyphicon-remove"></span></a>
                                        </div></td>
                                </tr><?php endforeach; endif; ?>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>

    </body>
</html>